home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
program
/
qbsvga.zip
/
FEATURE.ADV
next >
Wrap
Text File
|
1996-05-01
|
7KB
|
107 lines
This file describes what I'll call an "advanced feature" of QBSVGA.
There's nothing actually all that advanced about it. It just gives you a
"backdoor method" of overriding the VESA bios mode that QBSVGA identifies
as the one corresponding to the QB-type mode that you input to BSCREEN.
The reason for providing this capability is because, when the mode-finding
subroutine FINDVESA searches your VESA bios data area for the video mode
with the screen resolution that you're asking for, it stops at the first
such mode it finds. This is fine if that mode works. Unfortunately, it's
possible for your VESA bios to report support for a mode when such support
is somewhat faulty. Other than a faulty bios, the most likely cause of
this is that your video card has capability that your screen doesn't have,
at least in that particular video mode. Note that "video mode" here
refers to a specific bios integer used to access a video state with a
certain resolution and other attributes. It does not refer to the
resolution itself. You may very well be able to achieve that resolution
using some other video mode for which the support is not faulty. But
FINDVESA won't find that mode unless it's the first one it comes to. It
is also possible for your VESA bios to report that you only have hardware
support for a mode (in which case QBSVGA can't use it) when in fact, your
bios will communicate with your video system in this mode quite well. In
this latter case, QBSVGA wouldn't likely have any problem using this mode
except that FINDVESA won't give it an opportunity to try. The backdoor
feature described here may solve problems caused by these and similar
situations. (Of course, in the last situation discussed, it's entirely
possible to be in some in between state--some bios functions may work and
some may not. Consequences of this situation depend on what particular
bios functions are affected.)
If you know a particular bios mode integer will give you the
resolution you want and you know your system provides acceptable support
for it, you can use DOS' SET command to tell QBSVGA (i.e., subroutine
BSCREEN) not to call FINDVESA and just use the bios mode of your choice.
You do this by SETting up to 12 DOS environment variables, one for each of
the 12 QB-type SVGA modes provided by QBSVGA, before running a program
using the QBSVGA routines. (You can save environment space by not defining
such DOS variables for modes that you know you aren't going to need.)
These environment variables establish a correlation between the QB-type
mode and the bios mode integer that gives the resolution associated with
that QB-type mode. The name of each environment variable always contains 6
characters and always begins with "MODE". The fifth and sixth characters
specify the QB-type mode (14 - 25) that you're establishing a correlation
for. Each environment variable is set equal to thet HEXADECIMAL bios mode
that gives the resolution for the specified QB-type mode. For example,
let's say that you want an 800 x 600 x 16 screen mode (QB-type mode 15)
but everytime QBSVGA tries to get this QB-type mode, you don't get results
on the screen that you think are right--and you're sure it's because the
video state isn't being set correctly. The first thing to do is run VS
using its option that allows you to graphically confirm mode support.
(If you didn't read VS.TXT yet, now might be a good time.) Welcome back.
I hope I didn't do too bad of a job in VS.TXT explaining what to do with
the VS program. The advantage of running VS in its graphical confirmation
mode is that it right then and there won't show you modes in its MODES.LST
output file that your system (video card + screen) can't do. Look in
MODES.LST for the first bios mode that gives you your resolution. Calling
this integer "B", issue the following DOS command before running your
program that uses QBSVGA:
SET MODE15=B
(Substitute the actual bios mode integer that gives you the 800 x 600 x 16
resolution for "B".) Don't put any spaces to the left of the equal sign
in the SET command. (Spaces immediately to the right are okay, but don't
put them in the middle of B, i.e., if B = 6A, don't set MODE15 equal to
"6 A". Further, don't terminate your hexadecimal mode with an "h" (or
"H").) If QBSVGA works better now, it's apparent that FINDVESA was
finding a bios mode that your screen couldn't do. If your program doesn't
work better, go back to MODES.LST and look for another bios mode that
gives you the 800 x 600 x 16 resolution, reissue the above SET command,
and then try your program again. Repeat this process until you run out of
modes to try or QBSVGA works. (You should, by the way, be able to use
supported modes with the same screen resolution but increased colors with
no problem.)
If the VS program indicates that you have hardware support for a mode
you'd like to use, but no bios support, it would probably be worthwhile to
set the appropriate MODE## variable equal to the bios hex mode integer for
this mode and just see what happens. If you don't see your graphics
coming up when you expect it to, it's probably an indication that your
system really can't do that mode. (There's a good chance your system will
be locked up--did your screen go blank or start behaving in some berserk
manner? You should reboot your system in this situation to get your video
state out of that unsupported mode as soon as possible. If your system
isn't locked up and you can get back to a DOS prompt, but your screen
still appears to be in some wierd state, try DOS' MODE 80 command (or
MODE CO80, if your colors seem affected).)
Most importantly, when you go to set MODE##, make sure you set it
equal to the bios mode integer that gives you the resolution for "##" (and
a mode that you at least have some reason to believe you have support for),
not some other bios mode by mistake. It's the value of the bios mode
integer that determines what screen mode you get. (QBSVGA sets various
defaults based on "##" which are not necessarily compatible with non-
corresponding bios modes.) When you use this feature, the discussion in
QBSVGA.BAS regarding BSCREEN's prompt for the bios mode in the situation in
which FINDVESA cannot find a VESA mode does not apply. (Once you use the
SET MODE##= command to tell QBSVGA that you know a particular SVGA mode is
supported, it doesn't matter whether you have VESA support at all. However,
if you specify a bios mode larger than FFh, QBSVGA will assume that you have
VESA support when it determines how to make a screen mode change or how to
detect the current video mode in effect.) Further, you don't need to use VS
necessarily to find what bios modes you have VESA support for. You can use
the SET MODE##= command no matter how you know that the bios mode works with
your system. (The only advantage of VS is that MODES.LST lists the modes in
the order in which FINDVESA looks for them.)